package com.heny.demo.dbutils;

/**
 * @author litao.cc
 * @version DeviceHistoryDataTableNameProcessor.java v0.1 t2025/5/5 20:41
 * @date 2025/5/5 20:41
 * @description 设备历史数据表名处理器
 */
public class DeviceHistoryDataTableNameProcessor implements DynamicTableProcessor{
    @Override
    public String getTableName(DynamicTableModel model) {

        int y = model.getY();
        int m = model.getM();
        int d = model.getD();
        String time = y+DateUtils.toMHDStr(m)+DateUtils.toMHDStr(d);

        return String.format(TableNameConfig.device_history_data,model.getDeviceTypeId(),time);
    }

}
